<jsp:directive.page contentType="text/html;charset=UTF-8" />

<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal"
		aria-label="Close" data-ng-click="returnPage()">
		<span aria-hidden="true">&times;</span>
	</button>
	<h4 align="center" class="modal-title" id="exampleModalLabel">Task edit</h4>
</div>
<div class="modal-body">
	<table class="table table-hover table-striped table-bordered"
		style="width: 100%; height: 100%; padding: 0; margin: 0;">
		<tr>
			<td width="100%" align="center">

				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">任务ID：</div>
						<input type="text" id="taskId" class="form-control input-sm"
							data-ng-model="task.taskId.taskId" placeholder=""
							disabled="disabled" style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">任务ID</div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">任务分组：</div>
						<input type="text" id="taskGroup" class="form-control input-sm"
							data-ng-model="task.taskGroup" placeholder="" disabled="disabled"
							style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">任务分组</div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">任务名称：</div>
						<input type="text" id="taskName" class="form-control input-sm"
							data-ng-model="task.taskName" placeholder="" disabled="disabled"
							style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">任务名称</div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">状态：</div>
						<input type="text" id="taskStatus" class="form-control input-sm"
							data-ng-model="task.taskStatus" placeholder=""
							disabled="disabled" style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">状态</div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">开始时间：</div>
						<input type="text" id="runStartTime" class="form-control input-sm"
							data-ng-model="task.runStartTime" placeholder=""
							disabled="disabled" style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">
							<label class="checkbox-inline"><input type="checkbox"
								data-ng-model="task.immediatelyRun" disabled="disabled">启动后立即执行</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CronExpression
						</div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">结束时间：</div>
						<input type="text" id="runEndTime" class="form-control input-sm"
							data-ng-model="task.runEndTime" placeholder=""
							disabled="disabled" style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">CronExpression;未设定结束时间,任务单次执行结束;设定了则循环执行到结束时间</div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">任务参数：</div>
						<input type="text" id="taskParameter"
							class="form-control input-sm" data-ng-model="task.taskParameter"
							placeholder="" style="width: 870px;">
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">任务项：</div>
						<input type="text" id="taskItem" class="form-control input-sm"
							data-ng-model="task.taskItem" placeholder=""
							style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">不同的任务项将被分配到不同的TaskTracker，多个以英文逗号分隔</div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">每次处理完数据线程休眠时间：</div>
						<input type="text" id="sleepTimeInterval"
							class="form-control input-sm"
							data-ng-model="task.sleepTimeInterval" placeholder=""
							style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">单位：毫秒；设定了结束时间才有效</div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">允许执行任务的IP地址：</div>
						<input type="text" id="ipWhiteList" class="form-control input-sm"
							data-ng-model="task.ipWhiteList" placeholder=""
							style="width: 470px;">
						<div class="input-group-addon"
							style="width: 400px; text-align: left;">多个以英文逗号分隔,不设定表示所有机器都执行</div>
					</div>
				</div>
				<table style="border-spacing: 5px;"
					data-ng-show="task.interfaceType == 'SCHEDULE_TASK_MUTIL'">
					<tbody>
						<tr>
							<td colspan="2">&nbsp;</td>
						</tr>
					</tbody>
				</table>
				  <div class="form-group" style="margin-bottom: 5px;" data-ng-show="task.interfaceType == 'SCHEDULE_TASK_MUTIL'">
				    <div class="input-group">
				      <div class="input-group-addon" style="width: 280px;text-align: right;">批量处理的数据量：</div>
				      <input type="text" id="batchDealNum" class="form-control input-sm" data-ng-model="task.batchDealNum" placeholder="" style="width: 270px;">
				      <div class="input-group-addon" style="width: 600px;text-align: left;"></div>
				    </div>
				  </div>
				<div class="form-group" style="margin-bottom: 5px;"
					data-ng-show="task.interfaceType == 'SCHEDULE_TASK_MUTIL'">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">每个taskTracker开启线程数：</div>
						<input type="text" id="threadsOfRegion"
							class="form-control input-sm"
							data-ng-model="task.threadsOfRegion" placeholder=""
							style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;"></div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;"
					data-ng-show="task.interfaceType == 'SCHEDULE_TASK_MUTIL'">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">每次抓取数据的数量：</div>
						<input type="text" id="eachFetchDataNum"
							class="form-control input-sm"
							data-ng-model="task.eachFetchDataNum" placeholder=""
							style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;"></div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;"
					data-ng-show="task.interfaceType == 'SCHEDULE_TASK_MUTIL'">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">没有抓取到数据时，线程休眠时长：</div>
						<input type="text" id="sleepTimeNoData"
							class="form-control input-sm"
							data-ng-model="task.sleepTimeNoData" placeholder=""
							style="width: 270px;">
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">单位：毫秒.</div>
					</div>
				</div>
				<table style="border-spacing: 5px;">
					<tbody>
						<tr>
							<td colspan="2">&nbsp;</td>
						</tr>
					</tbody>
				</table>
				<!--div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">是否自动恢复异常状态：</div>
						<div class="form-control" style="width: 270px;" align="left">
							<label class="checkbox-inline"><input type="checkbox"
								data-ng-model="task.autoRecovery">自动恢复</label>
						</div>
						<div class="input-group-addon"
							style="width: 600px; text-align: left;">默认需要人工恢复异常状态的任务项；勾选自动恢复后，由系统自动恢复运行状态</div>
					</div>
				</div-->
				<table style="border-spacing: 5px;">
					<tbody>
						<tr>
							<td colspan="2">&nbsp;</td>
						</tr>
					</tbody>
				</table>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">告警类型：</div>
						<select class="form-control" style="width: 270px;"
							data-ng-model="task.alarmType" disabled="disabled">
							<option selected="selected">EMAIL</option>
						</select>
						<div class="input-group-addon"
							style="width: 600px; text-align: left;"></div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">告警策略：</div>
						<select class="form-control" style="width: 270px;"
							data-ng-model="task.alarmStrategy" disabled="disabled">
							<option selected="selected">DEFAULT</option>
						</select>
						<div class="input-group-addon"
							style="width: 600px; text-align: left;"></div>
					</div>
				</div>
				<div class="form-group" style="margin-bottom: 5px;">
					<div class="input-group">
						<div class="input-group-addon"
							style="width: 280px; text-align: right;">告警接收人：</div>
						<input type="text" id="sleepTimeNoData"
							class="form-control input-sm" maxlength="128"
							data-ng-model="task.alarmTo" placeholder="" style="width: 570px;">
						<div class="input-group-addon"
							style="width: 300px; text-align: left;">目前只支持邮件,英文逗号分隔.</div>
					</div>
				</div>
				<table>
					<tbody>
						<!-- tr>
							<td class="tdLeft">总线程数：</td>
							<td><input id="maxThreads" data-ng-model="task.maxThreads"
								size="50"></td>
							<td></td>
						</tr -->
						<tr>
							<td colspan="3" align="center">
								<button type="button" class="btn btn-info"
									data-ng-click="returnPage()">关闭</button> &nbsp;&nbsp;&nbsp;
								<button type="button" class="btn btn-success"
									data-ng-show="isEdit==1" data-ng-click="saveTask()">保存</button>
							</td>


						</tr>
					</tbody>
				</table>

			</td>
		</tr>
	</table>
</div>
